﻿using BusinessService.Plugin.Services.Dtos;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BusinessService.Plugin.Const
{
    public  class StaticResource
    {
        private readonly TransferDtos _Dto;
        public StaticResource(TransferDtos Dto)
        {
                _Dto = Dto;
        }
        /// <summary>
        /// Tcp角色
        /// </summary>
        public static string Tcp_Role { get; set; } = string.Empty;
        /// <summary>
        /// 主题
        /// </summary>
        public static string MQTT_Topic { get; set; } = string.Empty;




        /// <summary>
        /// 向前端发送消息
        /// </summary>
        /// <param name="args"></param>
        public  void SendMsg(string info)
        {

            _Dto.RealTimeMessage += $"{DateTime.Now.ToString()}\r\n{info}\r\n\r\n";

        }
    }


}


